<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!--<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
 
  <head>
    <title>添加商品分类</title>
    <link href="<%=basePath%>resources/css/stylesMonitor.css" type=text/css rel=stylesheet>
    <script type="text/javascript" src="<%=basePath%>resources/scripts/prototype.js"></script>
    <script type="text/javascript" src="<%=basePath%>resources/scripts/My97DatePicker/WdatePicker.js"></script>
   	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
<style type="text/css">
* {
	font-size: 15px;
	font-family: 微软雅黑;
}

td {
	color: #587b94;
}


.Label1 {
	font-family: 微软雅黑;
	background: #f2f7fc;
	padding: 3px 8px 3px 3px;
	font-size: 16px;
	text-align: right;
	height: 60px;
	width: 15%;
}

.EditTableHeader input:first-child {
	background: #32b5ca;
}

.ContentTable {
	width: 100%;
	font-size: 12px;
	background: #FCF5F5;
	border-spacing: 1px;
	
}

.ContentTable td {
	width: 100%;
	font-size: 14px;
	background: white;
	border-spacing: 1px;
	text-align: center;
}

.EditTableHeader {
	color: #32b5ca;
	background: #ecf4f7;
	font-size: 20px;
	font-weight: normal;
	text-align: center;
	height: 60px;
	padding: 4px;
}

input {
	width: 250px;
	height: 40px;
	border: 0px solid #e2ebf0;
	color: #587b94;
	outline: none;
	border-bottom:1px solid #e2ebf0;
}

select {
	width: 250px;
	height: 40px;
	border: 1px solid #e2ebf0;
	color: #587b94;
}

#submit {
	height: 60px;
	line-height: 60px;
	background: url("../resources/images/monitorSystem/submit.png")
		no-repeat;
	border-style: none;
	outline: none;
	width: 190px;
	margin-top: 5px;
 	margin-right: 50px; 
}

#submit:HOVER {
	height: 60px;
	line-height: 60px;
	background: url("../resources/images/monitorSystem/submit_focus.png")
		no-repeat;
	border-style: none;
	outline: none;
	width: 190px;
	margin-top: 5px;
 	margin-right: 50px;
}

#reset {
	height: 60px;
	line-height: 60px;
	background: url("../resources/images/monitorSystem/reset.png") no-repeat;
	border-style: none;
	outline: none;
	width: 190px;
	margin-top: 5px;
 	margin-left: 50px;
}

#reset:HOVER {
	height: 60px;
	line-height: 60px;
	background: url("../resources/images/monitorSystem/reset_focus.png")
		no-repeat;
	border-style: none;
	outline: none;
	width: 190px;
	margin-top: 5px;
    margin-left: 50px;
}
</style>
<script type="text/javascript">
  	function checkForm(){
  		var oForm = document.forms[0];
  		
  		if(oForm.name.value.length==0){
  			alert("请输入名称");
  			return false;
  		} 		
  	
  		return true;
  	}
  </script>
  </head>

  <body>
   <div class="ContentContainer">
 <div id="divListContainer">
 <form action="<%=basePath%>category/add" method="post" onsubmit="return checkForm()">
  <div >
  	<div >
        <table   class="ContentTable" style="width:1042px;margin-top: 25px;border: 1px solid #EEEEEE" align="center">
         
          <tr align="center">
            <td class="EditTableHeader" width="600px" align="center" height="80px" colspan="2" style="font-size: 20px;color: rgb(39, 65, 86);background-color: rgb(236, 244, 247)">新增主机</td>
          </tr>
                  
          <tr align="center">
            <td  class="Label1" width="200px" align="right" height="40px">分类名称：&nbsp;&nbsp;</td>
            <td class="Field1" width=400px align="left" >
            	<input type="text" size="30" name="name" style="width: 230px;height: 40px">
				  <font color="#ff0000"><span>*</span></font>
            </td>
          </tr>
         
          <tr align="center">
            <td  colspan="4"  align="center" >
           		<input type="submit" name="button2"  value="提交" id="submit">
				<input type="reset" value="重置" id="reset">
				<input type="button" name="button3"  value="返回" style="width=60px" onclick="javascript:backtolist()"/> &nbsp;&nbsp;&nbsp;&nbsp;
            </td>
          </tr>
      </table>
      
    </div>
  </div>
  </form>
  </div>
  <script type="text/javascript">
	function backtolist(){
		window.location.href='<%=basePath%>category/list?id='+${category.id};
	}
	</script>
  </div>
</body>

</html>
